﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using zichan.BLL;
using zichan.Entity;

namespace zichan.Controllers
{
    public class HomeController : BaseController
    {
        public ActionResult Index()
        {
           
            int count;
            int useCount;
            int subCount;
            IPService.IPCount(out count, out useCount, out subCount);
            ViewBag.IPCount = count;
            ViewBag.UseIPCout = useCount;
            ViewBag.subIPCount = subCount;

            int cCount;
            int cUseCount;
            int cSubCount;
            CabinetManageService.Count(out cCount, out cUseCount, out cSubCount);
            ViewBag.CabinetRackCount = cCount;
            ViewBag.CabinetRackBusy = cUseCount;
            ViewBag.subCabinetRack = cSubCount;

            int sCount;
            int spareCount;
            int busyCount;
            int scrapCount;
            RepertoryService.Count(out sCount, out spareCount, out busyCount, out scrapCount);
            ViewBag.ServerCount =sCount;
            ViewBag.SpareCount = spareCount;
            ViewBag.BusyCount = busyCount;
            ViewBag.ScrapCount = scrapCount;
            string str = Server.MachineName;
            return View();
        }
        
    }
}